<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2018/3/1
 * Time: 10:35
 */

namespace App\Http\Controllers\MiniProgram;


use App\Http\Logics\MiniProgram\DianBoLogic;
use App\Http\Traits\DianBoTrait;
use App\Http\Controllers\BaseController;
class DianBoController extends BaseController
{
    use DianBoTrait;

    /**
     * @SWG\Post(
     *     path="/dianBo/uploadVideo",
     *     tags={"DianBo"},
     *     description="云点播上传视频",
     *     operationId="uploadVideo",
     *     produces={"application/json", "application/xml", "text/xml", "text/html"},
     *     @SWG\Parameter(
     *         name="loginSession",
     *         in="query",
     *         description="秘钥验证",
     *         type="string"
     *     ),
     *     @SWG\Parameter(
     *         name="video_file",
     *         in="query",
     *         description="视频文件",
     *         type="string"
     *     ),
     *     @SWG\Response(
     *         response=200,
     *         description="pet response"
     *     )
     * )
     */
    public function uploadVideo()
    {
        $video_file  = $this->video_file;
        $data = [
            'video_file' => $video_file
        ];
        $response = DianBoLogic::uploadVideo($data);
        if ($response->code){
            return $this->response($response->code, $response->message);
        }
        return $this->response($response->code, $response->message, $response->data);
    }

    public function callback()
    {

    }
}